package com.hxkj.dao.impl;

import com.hxkj.dao.LabelUsageInfoDao;
import com.hxkj.mapper.LabelUsageInfoMapper;
import com.hxkj.domain.po.LabelUsageInfo;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List;


/**
* 数据操作实现
*
* @author: chenwei
* @version: 1.0
* @datetime: 2018-07-24 09:17:25
*
*/
@Service("labelUsageInfoDao")
public class LabelUsageInfoDaoImpl implements LabelUsageInfoDao {

    @Resource
    private LabelUsageInfoMapper labelUsageInfoMapper;

    @Override
    public LabelUsageInfo get(Long labelUsageId) {
        return labelUsageInfoMapper.selectByPrimaryKey(labelUsageId);
    }

    @Override
    public List<LabelUsageInfo> get(LabelUsageInfo labelUsageInfo) {
        return labelUsageInfoMapper.select(labelUsageInfo);
    }

    @Override
    public int delete(Long labelUsageId) {
        return labelUsageInfoMapper.deleteByPrimaryKey(labelUsageId);
    }

    @Override
    public int delete(LabelUsageInfo labelUsageInfo) {
        return labelUsageInfoMapper.delete(labelUsageInfo);
    }

    @Override
    public int save(LabelUsageInfo labelUsageInfo) {
        return labelUsageInfoMapper.insert(labelUsageInfo);
    }

    @Override
    public int update(LabelUsageInfo labelUsageInfo) {
        return labelUsageInfoMapper.update(labelUsageInfo);
    }

    @Override
    public int batchInsertUsage(List<LabelUsageInfo> usageList) {
        return labelUsageInfoMapper.batchInsertUsage(usageList);
    }
}
